From: Paul Eggert Date: Fri, 1 Jul 2011 00:30:18 +0000 (-0700) Subject: * emacs-lisp/elp.el (elp-elapsed-time): Use float-time. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~3214^2~10 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=ffa5498a63fa5c6b7e12d61242d78a97dd0741b1;p=emacs.git * emacs-lisp/elp.el (elp-elapsed-time): Use float-time. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 760dd2b42f9..cbad4c01de9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -3,6 +3,7 @@ * calendar/timeclock.el (timeclock-seconds-to-time): Defalias to seconds-to-time, since they're the same thing. + * emacs-lisp/elp.el (elp-elapsed-time): * emacs-lisp/benchmark.el (benchmark-elapse): * allout-widgets.el (allout-elapsed-time-seconds): Use float-time. diff --git a/lisp/emacs-lisp/elp.el b/lisp/emacs-lisp/elp.el index 73af3a5708f..b89b6decfc9 100644 --- a/lisp/emacs-lisp/elp.el +++ b/lisp/emacs-lisp/elp.el @@ -282,7 +282,7 @@ FUNSYM must be a symbol of a defined function." ;; the function so that non-local exists are still recorded. TBD: ;; I haven't tested non-local exits at all, so no guarantees. ;; - ;; The 1st element is the total amount of time in usecs that have + ;; The 1st element is the total amount of time in seconds that has ;; been spent inside this function. This number is added to on ;; function exit. ;; @@ -424,9 +424,7 @@ Use optional LIST if provided instead." (defsubst elp-elapsed-time (start end) - (+ (* (- (car end) (car start)) 65536.0) - (- (car (cdr end)) (car (cdr start))) - (/ (- (car (cdr (cdr end))) (car (cdr (cdr start)))) 1000000.0))) + (float-time (time-subtract end start))) (defun elp-wrapper (funsym interactive-p args) "This function has been instrumented for profiling by the ELP.